# Contributor: Thomas Kienlen <kommander@laposte.net>
# Maintainer: Thomas Kienlen <kommander@laposte.net>
pkgname=go-passbolt-cli
pkgver=0.1.7
pkgrel=3
pkgdesc="Command-line tool to interact with Passbolt"
url="https://github.com/passbolt/go-passbolt-cli"
arch="all"
license="MIT"
makedepends="go"
source="
	https://github.com/passbolt/go-passbolt-cli/archive/v$pkgver/go-passbolt-cli-$pkgver.tar.gz
	passbolt-cli-helper.sh
	"

export GOFLAGS="$GOFLAGS -modcacherw"
export GOPATH="$srcdir"

build() {
	go build -trimpath -o go-passbolt-cli
}

check() {
	go test -v ./...
}

package() {
	install -Dm755 go-passbolt-cli "$pkgdir"/usr/bin/go-passbolt-cli
	install -Dm755 "$srcdir"/passbolt-cli-helper.sh "$pkgdir"/usr/bin/passbolt-cli-helper
}

sha512sums="
d67ab521ab664ae6cd6b033dd316dc7134c295c02bfbd44bf82cf4e101ed02a8fb3ba1086e1fd115d3307c8d138ebaf008e23053aba598cbe25276209fd27865  go-passbolt-cli-0.1.7.tar.gz
93daf603af9945e70cd009eb7a9326049622299b3f1f55b41ae98f1eaa07ce8778d27915bf1e96aa7b7d34c492ab0ce11d8481f616b9ca464e497b82bd18289f  passbolt-cli-helper.sh
"
